<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- 
    JSP Name : rt_100_21K.jsp
    Description : 회원가입등록폼.
    author Seung Hun
    since 2012. 8. 24.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 8. 24.     Seung Hun     최초 생성
--%>
<%@ include file="/WEB-INF/jsp/co/us/include/declare.jspf" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>현대자동차 CSR &#124; 회원가입</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<%@ include file="/WEB-INF/jsp/co/us/include/header.jspf" %>
<script type="text/javaScript" language="javascript">
<!--
$(document).ready(function() {
    /* form validation check */
    onloadCharCheck();
    
    $("#rgstButn").bind("click", mbrEntSubm);    // 가입등록
    $("#cnclButn").bind("click", formIniz); // 초기화
    $("#userPwConf").bind("keyup", getUserPwConf); // 비밀번호 확인
});

/*  
 * 회원가입등록
 */
function mbrEntSubm() {
    if (!validateForm($("#mainForm"))) {
        return;
    }
    
    if (!getIDEmailCheck($("#userId").val())) {
        alert("[메일주소] 가 이메일 형식과 맞지 않습니다.");
        $("input[name='userId']").focus();
        return false;
    }
    
    if (!getUserPwConf()) {
        alert("비밀번호가 동일하지 않습니다.");
        $("input[name='userPwConf']").focus();
        return false;
    }
    
    $("#mainForm").attr('target','comIframe');
    $("#mainForm").attr('action','/rt_100_23.do');
    $("#mainForm").submit();
}

/*
 * 비밀번호확인
 */
function getUserPwConf() {
    if ($("#userPw").val() == $("#userPwConf").val()) {
        $("#addcConf").removeClass("wrongMsg");
        $("#accdConf").html("일치");
        return true;
    } else {
        $("#accdConf").html("불일치");
        $("#accdConf").addClass("wrongMsg");
        return false;
    }
}

/*
 * Form 초기화
 */
function formIniz() {
    $("form").each(function(){
       this.reset(); 
    });
}
//-->
</script>
</head>
<body>
<div id="wrap">

    <!-- top -->
    <%@ include file="/WEB-INF/jsp/co/us/include/top.jsp" %>
    <!-- top -->

    <!-- container -->
    <div id="container">
        <div id="contentsWrap">
            <div id="contentsArea">
                <div class="headingArea">
                    <div class="location">
                        <a href="/ma_100_01.do">홈</a>
                        <span>회원가입</span>
                    </div>
                    <h2>회원가입</h2>
                </div>
                <form id="mainForm" name="mainForm" method="post">
                    <input type="hidden" id="chkUse" name="chkUse" value="${rqInfo.chkUse }" />
                    <input type="hidden" id="chkPrivat" name="chkPrivat" value="${rqInfo.chkPrivat }" />
                <div id="contetns">
                    <div class="joinStep2">
                        <p class="welcomeMsg"><img src="/img/usr/common/join_msg_welcome.gif" alt="현대자동차 글로벌 CSR 홈페이지 방문을 환영합니다." /></p>

                        <div class="gradBoxWrap">
                            <div class="gradBoxBtm">
                                <div class="gradBoxTop">
                                    <div class="writeJoinInfo">
                                        <p>
                                            <strong><img src="/img/usr/common/join_item_name.gif" alt="이름" /></strong>
                                            <input type="text" id="userNm" name="userNm" maxlength="6" title="이름" nullable="true" minbyte="2" maxbyte="20" />
                                        </p>
                                        <p>
                                            <strong><img src="/img/usr/common/join_item_comp.gif" alt="기관명" /></strong>
                                            <input type="text" id="instNm" name="instNm" maxlength="16" title="기관명" nullable="true" minbyte="2" maxbyte="50" />
                                        </p>
                                        <p>
                                            <strong><img src="/img/usr/common/join_item_mail.gif" alt="메일주소" /></strong>
                                            <input type="text" id="userId" name="userId" maxlength="100" title="메일주소" nullable="true" minbyte="2" maxbyte="100" />
                                            <span class="warningMsg">주로 사용하시는 메일주소를 입력해 주세요.<br />메일 주소가 아이디로 등록됩니다. </span>
                                        </p>
                                        <p>
                                            <strong><img src="/img/usr/common/join_item_pwd.gif" alt="비밀번호" /></strong>
                                            <input type="password" id="userPw" name="userPw" maxlength="12" title="비밀번호" nullable="true" minbyte="8" maxbyte="12" chartype="password" />
                                            <span class="warningMsg">영문 대/소문자와 숫자, 특수문자 조합으로 8~12자로 설정해주십시오.</span>
                                        </p>
                                        <p>
                                            <strong><img src="/img/usr/common/join_item_repwd.gif" alt="비밀번호 확인" /></strong>
                                            <input type="password" id="userPwConf" name="userPwConf" maxlength="12" title="비밀번호 확인" nullable="true" minbyte="8" maxbyte="12" chartype="password" />
                                            <span id="accdConf"></span>
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    </form>
                    <div class="btnArea dirCnt">
                        <input type="image" src="/img/usr/btn/btn_pop_reg.gif" id="rgstButn" name="rgstButn" title="등록" alt="등록" />
                        <input type="image" src="/img/usr/btn/btn_pop_cancel.gif" id="cnclButn" name="cnclButn" title="취소" alt="취소" />
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /container -->

    <!-- footer -->
    <%@ include file="/WEB-INF/jsp/co/us/include/bottom.jsp" %>
    <!-- /footer -->
    
</div>
</body>
</html>